home *** CD-ROM | disk | FTP | other *** search
/ CD Exchange / CD Exchange - Volume 1.iso / utils / misc / bytefilter / libs / jhextras.doc < prev    next >
Encoding:
Text File  |  1993-10-14  |  18.7 KB  |  758 lines

  1.  
  2.                           JHExtras.library V37.58
  3.  
  4.                     Copyright (c) 1993 by Jan Hagqvist
  5.  
  6.  
  7. COPYRIGHT
  8.  
  9.     Copyright (c) 1993, Jan Hagqvist, All Rights Reserved.
  10.  
  11.     This library is FREEWARE. You may freely use and distribute this
  12.     library under the following conditions:
  13.  
  14.     1) No modifications are made into the library or this documentation
  15.        and all the files are spread together. However, you are allowed
  16.        to compress all the files into an archive for distribution.
  17.  
  18.     2) No money (other than nominal copying fees) is charged for its
  19.        distribution.
  20.  
  21. DISCLAIMER
  22.  
  23.     THIS LIBRARY IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
  24.     EITHER EXPRESSED OR IMPLIED. THE AUTHOR WILL NOT BE LIABLE FOR
  25.     ANY DAMAGES, DIRECT, INDIRECT, INCIDENTAL OR CONSEQUENTIAL,
  26.     RESULTING FROM THE USE OF THE LIBRARY. THE ENTIRE RISK AS TO THE
  27.     USE OF THIS LIBRARY IS ASSUMED BY THE USER.
  28.  
  29.  
  30. ------------------------------------------------------------------------------
  31.  
  32. jhextras.library/JHCopyString
  33.  
  34. NAME
  35.     JHCopyString - copy a string (V37)
  36.  
  37. SYNOPSIS
  38.     JHCopyString(string,dest)
  39.              a0        a1
  40.  
  41. FUNCTION
  42.     Simply copies a null terminated string to another memory location.
  43.     This function preserves both a0 and a1.
  44.  
  45. INPUTS
  46.     string - string to be copied
  47.     dest   - destination area to hold the copy of the string
  48.  
  49. ------------------------------------------------------------------------------
  50.  
  51. jhextras.library/JHCreateIORequest
  52.  
  53. NAME
  54.     JHCreateIORequest - create an IORequest structure (V37)
  55.  
  56. SYNOPSIS
  57.     ioReq=JHCreateIORequest(ioReplyPort,size)
  58.     d0            a0        d0
  59.  
  60. FUNCTION
  61.     Creates a new IO request block of size bytes.
  62.  
  63. INPUTS
  64.     ioReplyPort - Pointer to a port for replies
  65.     size        - the size of the IO request to be created
  66.  
  67. RESULT
  68.     ioReq - A pointer to the new IO request block, or NULL
  69.  
  70. SEE ALSO
  71.     JHDeleteIORequest, JHCreateMsgPort, exec/CreateIORequest (V36)
  72.  
  73. ------------------------------------------------------------------------------
  74.  
  75. jhextras.library/JHCreateMsgPort
  76.  
  77. NAME
  78.     JHCreateMsgPort - Allocate and initialize a new message port (V37)
  79.  
  80. SYNOPSIS
  81.     msgPort=JHCreateMsgPort()
  82.     d0
  83.  
  84. FUNCTION
  85.     Allocates and initializes a new non-public message port. To add this
  86.     port to the public port list, fill in the ln_Name and ln_Pri fields,
  87.     then call exec/AddPort().
  88.  
  89. RESULT
  90.     msgPort - A new msgport ready for use, or NULL if out of memory or
  91.           signals.
  92.  
  93. SEE ALSO
  94.     JHDeleteMsgPort, exec/AddPort, exec/CreateMsgPort (V36)
  95.  
  96. ------------------------------------------------------------------------------
  97.  
  98. jhextras.library/JHDeleteIORequest
  99.  
  100. NAME
  101.     JHDeleteIORequest - Free a IO request made by JHCreateIORequest (V37)
  102.  
  103. SYNOPSIS
  104.     JHDeleteIORequest(ioReq)
  105.               a0
  106.  
  107. FUNCTION
  108.     Frees up an IO request as allocated by JHCreateIORequest.
  109.  
  110. INPUTS
  111.     ioReq - A pointer to the IORequest block to be freed
  112.  
  113. SEE ALSO
  114.     JHCreateIORequest, exec/DeleteIORequest (V36)
  115.  
  116. ------------------------------------------------------------------------------
  117.  
  118. jhextras.library/JHDeleteMsgPort
  119.  
  120. NAME
  121.     JHDeleteMsgPort - Free a message port created by JHCreateMsgPort (V37)
  122.  
  123. SYNOPSIS
  124.     JHDeleteMsgPort(msgPort)
  125.             a0
  126.  
  127. FUNCTION
  128.     Frees a message port created by JHCreateMsgPort. There must not be
  129.     unreplied messages in the port.
  130.  
  131. INPUTS
  132.     msgPort - A message port.
  133.  
  134. SEE ALSO
  135.     JHCreateMsgPort, exec/DeleteMsgPort (V36)
  136.  
  137. ------------------------------------------------------------------------------
  138.  
  139. jhextras.library/JHEasyCloseDevice
  140.  
  141. NAME
  142.     JHEasyCloseDevice - closes a device (V37)
  143.  
  144. SYNOPSIS
  145.     JHEasyCloseDevice(iorequest)
  146.               a1
  147.  
  148. FUNCTION
  149.     Closes a device and automatically deletes the msgport and iorequest
  150.     reserved.
  151.  
  152. INPUTS
  153.     iorequest - the iorequest reserved by JHEasyOpenDevice
  154.  
  155. SEE ALSO
  156.     JHEasyOpenDevice()
  157.  
  158. ------------------------------------------------------------------------------
  159.  
  160. jhextras.library/JHEasyOpenDevice
  161.  
  162. NAME
  163.     JHEasyOpenDevice - opens a device (V37)
  164.  
  165. SYNOPSIS
  166.     iorequest=JHEasyOpenDevice(name,unit,flags,reqsize)
  167.     d0               a0    d0   d1       d2
  168.  
  169. FUNCTION
  170.     Opens a device and automatically creates the msgport and iorequest
  171.     required by the device.
  172.  
  173. INPUTS
  174.     name    - the device name to be opened
  175.     unit    - the unit number of the device to be opened
  176.     flags    - the flags to be passed to exec/OpenDevice()
  177.     reqsize    - the iorequest block size
  178.  
  179. RESULTS
  180.     iorequest - the iorequest block used to access the device, or NULL
  181.             if the device couldn't be opened
  182.  
  183. SEE ALSO
  184.     JHEasyCloseDevice()
  185.  
  186. ------------------------------------------------------------------------------
  187.  
  188. jhextras.library/JHFormatAString
  189.  
  190. NAME
  191.     JHFormatAString - format data into a string (V37)
  192.  
  193. SYNOPSIS
  194.     JHFormatAString(formatstring,datastream,dest)
  195.             a0         a1        a2
  196.  
  197. FUNCTION
  198.     Perform "C"-language-like formatting of a data stream, outputting
  199.     the result in to dest. Exec's RawDoFmt-routine will be used for
  200.     the task.
  201.  
  202. INPUTS
  203.     formatstring - a "C"-language-like null terminated format string
  204.     datastream   - a stream of data that is interpreted according to
  205.                the format string
  206.     dest         - the destination area where the finished string is
  207.                output
  208.  
  209. SEE ALSO
  210.     exec.library/RawDoFmt
  211.  
  212. ------------------------------------------------------------------------------
  213.  
  214. jhextras.library/JHGetMenu
  215.  
  216. NAME
  217.     JHGetMenu - Translate IntuiMessage Code to menu numbers (V37)
  218.  
  219. SYNOPSIS
  220.     JHGetMenu(code,destarea)
  221.           d0   a0
  222.  
  223. FUNCTION
  224.     Translates IntuiMessage Code to MenuNum, ItemNum and SubNum. The
  225.     result is written to a 3-byte area of MenuNum, ItemNum and SubNum one
  226.     byte at a time, so the area doesn't need to be word-aligned.
  227.  
  228.     Note that MenuNum, ItemNum and SubNum are all bytes, and the order
  229.     between them must be preserved.
  230.  
  231. INPUTS
  232.     code     - the code field of intuimessage received
  233.     destarea - pointer to a 3-byte destarea were the menunum, subnum and
  234.            itemnum are to be written
  235.  
  236. ------------------------------------------------------------------------------
  237.  
  238. jhextras.library/JHGetString
  239.  
  240. NAME
  241.     JHGetString - get a null terminated string from user (V37)
  242.  
  243. SYNOPSIS
  244.     bool=JHGetString(window,title,buffer,maxchars)
  245.     d0         a0    a1    a2     d0
  246.  
  247. FUNCTION
  248.     Gets a null terminated string from the user using the screen's own
  249.     font. The requester window will be opened in the middle of the screen
  250.     and the length of the window title will determine the window width.
  251.     Note that if the window width would be larger than the screen width,
  252.     the window width will be truncated to the screen width.
  253.  
  254.     The maxchars argument will indicate the buffer length plus null. So,
  255.     if you can handle 20 chars the buffer should be 21 bytes long.
  256.  
  257. INPUTS
  258.     window   - pointer to a window whose screen will be used for the
  259.            requester, or null for Workbench screen
  260.     title    - the window title
  261.     buffer   - the buffer to hold the string
  262.     maxchars - the buffer length
  263.  
  264. RESULTS
  265.     bool - returns null if there was an error (no window etc.)
  266.  
  267. ------------------------------------------------------------------------------
  268.  
  269. jhextras.library/JHLowerChar
  270.  
  271. NAME
  272.     JHLowerChar - Make char lowercase (V37)
  273.  
  274. SYNOPSIS
  275.     lowerchar=JHLowerChar(char)
  276.     d0              d0
  277.  
  278. FUNCTION
  279.     Returns the char in lowercase. Handles A-Z and also Å,Ä and Ö.
  280.  
  281. INPUTS
  282.     char - any char
  283.  
  284. RESULTS
  285.     lowerchar - the char in lowercase
  286.  
  287. SEE ALSO
  288.     JHUpperChar()
  289.  
  290. ------------------------------------------------------------------------------
  291.  
  292. jhextras.library/JHLowerString
  293.  
  294. NAME
  295.     JHLowerString - Make string lowercase (V37)
  296.  
  297. SYNOPSIS
  298.     lowerstring=JHLowerString(string)
  299.     d0              a0
  300.  
  301. FUNCTION
  302.     Returns the string in lowercase. Handles a-z and also å,ä and ö.
  303.  
  304. INPUTS
  305.     string - any string
  306.  
  307. RESULTS
  308.     string - the string in lowercase
  309.  
  310. SEE ALSO
  311.     JHLowerChar(), JHUpperChar(), JHUpperString()
  312.  
  313. ------------------------------------------------------------------------------
  314.  
  315. jhextras.library/JHOpen
  316.  
  317. NAME
  318.     JHOpen - Open a file for input or output (V37)
  319.  
  320. SYNOPSIS
  321.     file=JHOpen(name,accessmode,window)
  322.     d0        d1     d2        a0
  323.  
  324. FUNCTION
  325.     The named file is opened and a file handle returned. On V35 and
  326.     earlier this function acts just as dos.library/Open().
  327.  
  328.     In V36+ the following will happen:
  329.  
  330.     If the accessmode is MODE_NEWFILE and the file already exists, the
  331.     user will be consulted whether to overwrite the old file or cancel
  332.     the operation.
  333.  
  334.     If the accessmode is MODE_OLDFILE and the file cannot be opened,
  335.     the user will be notified.
  336.  
  337. INPUTS
  338.     name       - pointer to a null-terminated string
  339.     accessmode - integer
  340.     window     - pointer to a window whose screen will be used for the
  341.              requester, or null for Workbench screen
  342.  
  343. RESULTS
  344.     file - BCPL pointer to a file handle
  345.  
  346. SEE ALSO
  347.     dos.library/Open()
  348.  
  349. ------------------------------------------------------------------------------
  350.  
  351. jhextras.library/JHReadBytes
  352.  
  353. NAME
  354.     JHReadBytes - Reads some bytes from a floppy disk (V37)
  355.  
  356. SYNOPSIS
  357.     bool=JHReadBytes(buffer,iorequest,offset,length)
  358.     d0         a0     a1      d0     d1
  359.  
  360. FUNCTION
  361.     Reads a defined amount of bytes from a floppy disk starting at offset
  362.     and using the device specified in iorequest. The buffer is the place
  363.     where the bytes are read. This function only supports normal DOS
  364.     disks.
  365.  
  366. INPUTS
  367.     buffer    - the memory where the bytes are read
  368.     iorequest - an IORequest block such as returned by JHEasyOpenDevice
  369.     offset    - byte offset from the start of the disk where to begin
  370.             the read
  371.     length    - the amount of bytes to be read
  372.  
  373. RESULTS
  374.     bool - non-NULL, if an error occurred, otherwise NULL
  375.  
  376. SEE ALSO
  377.     JHReadSector(), JHReadTrack(), JHStopDisk()
  378.  
  379. ------------------------------------------------------------------------------
  380.  
  381. jhextras.library/JHReadSector
  382.  
  383. NAME
  384.     JHReadSector - Reads a sector from a floppy disk (V37)
  385.  
  386. SYNOPSIS
  387.     bool=JHReadSector(sectorbuffer,iorequest,sector)
  388.     d0          a0           a1     d0
  389.  
  390. FUNCTION
  391.     Reads a sector from a floppy disk via trackdisk.device. This function
  392.     is for normal 3.5"-inch DSDD drives. The sectorbuffer is the place
  393.     where the sector is read and its length must be 512 bytes. This
  394.     function only supports normal DOS disks.
  395.  
  396. INPUTS
  397.     sectorbuffer - the data that is to be written
  398.     iorequest    - an IORequest block such as returned by JHEasyOpenDevice
  399.     sector         - the sector number to be written (0-1759)
  400.  
  401. RESULTS
  402.     bool - non-NULL, if an error occurred, otherwise NULL
  403.  
  404. BUGS
  405.     Doesn't check whether the sector number is valid (0-1759).
  406.  
  407. SEE ALSO
  408.     JHReadBytes(), JHReadTrack(), JHStopDisk
  409.  
  410. ------------------------------------------------------------------------------
  411.  
  412. jhextras.library/JHReadTrack
  413.  
  414. NAME
  415.     JHReadTrack - Reads a track from a floppy disk (V37)
  416.  
  417. SYNOPSIS
  418.     bool=JHReadTrack(trackbuffer,iorequest,track)
  419.     d0         a0         a1           d0
  420.  
  421. FUNCTION
  422.     Reads a track from a floppy disk via trackdisk.device. This function
  423.     is for normal 3.5"-inch DSDD drives. The trackbuffer is the place
  424.     where the track is read and its length must be 5632 bytes. Each track
  425.     contains 11 sectors and each sector consists of 512 bytes. Each 3.5"-
  426.     inch DSDD disk contains 160 tracks. This function only supports normal
  427.     DOS disks.
  428.  
  429. INPUTS
  430.     trackbuffer - the memory where the track is read
  431.     iorequest   - an IORequest block such as returned by JHEasyOpenDevice
  432.     track        - the track number to be read (0-159)
  433.  
  434. RESULTS
  435.     bool - non-NULL, if an error occurred, otherwise NULL
  436.  
  437. BUGS
  438.     Doesn't check whether the track number is valid (0-159).
  439.  
  440. SEE ALSO
  441.     JHReadBytes(), JHReadSector(), JHStopDisk()
  442.  
  443. ------------------------------------------------------------------------------
  444.  
  445. jhextras.library/JHRnd
  446.  
  447. NAME
  448.     JHRnd - Generate a random number (V37)
  449.  
  450. SYNOPSIS
  451.     num=JHRnd(upperlimit)
  452.     d2      d2
  453.  
  454. FUNCTION
  455.     Returns a 16-bit random number between 0 and upperlimit.
  456.  
  457. INPUTS
  458.     upperlimit - a 16-bit integer
  459.  
  460. RESULTS
  461.     num - a 16-bit random integer
  462.  
  463. ------------------------------------------------------------------------------
  464.  
  465. jhextras.library/JHStopDisk
  466.  
  467. NAME
  468.     JHStopDisk - Turns a floppy disk drive motor off (V37)
  469.  
  470. SYNOPSIS
  471.     JHStopDisk(iorequest)
  472.            a1
  473.  
  474. FUNCTION
  475.     Stops the drive motor from the drive specified in iorequest. Use this
  476.     to stop the drive you read from or written to with JHReadxx/JHWritexx.
  477.  
  478. INPUTS
  479.     iorequest - an IORequest block such as returned by JHEasyOpenDevice
  480.  
  481. ------------------------------------------------------------------------------
  482.  
  483. jhextras.library/JHStrCmp
  484.  
  485. NAME
  486.     JHStrCmp - Compare two null-terminated strings (V37)
  487.  
  488. SYNOPSIS
  489.     bool=JHStrCmp(string1,string2)
  490.     d0          a0      a1
  491.  
  492. FUNCTION
  493.     Compares two strings and returns 0, if the strings are not same.
  494.     If the strings are exactly same, the function returns 1. Note that
  495.     this function is case-sensitive. For case-insensitive operation, see
  496.     JHStrCmpNoCase function.
  497.  
  498. INPUTS
  499.     string1 - any null terminated string
  500.     string2 - any null terminated string
  501.  
  502. RESULTS
  503.     bool - 1 if the strings are equal, 0 otherwise
  504.  
  505. SEE ALSO
  506.     JHStrCmpNoCase()
  507.  
  508. ------------------------------------------------------------------------------
  509.  
  510. jhextras.library/JHStrCmpNoCase
  511.  
  512. NAME
  513.     JHStrCmpNoCase - Compare two null-terminated strings (V37)
  514.  
  515. SYNOPSIS
  516.     bool=JHStrCmpNoCase(string1,string2)
  517.     d0            a0        a1
  518.  
  519. FUNCTION
  520.     Compares two strings and returns 0, if the strings are not same.
  521.     If the strings are exactly same, the function returns 1. Note that
  522.     this function is case-insensitive. For case-sensitive operation, see
  523.     JHStrCmp function.
  524.  
  525. INPUTS
  526.     string1 - any null terminated string
  527.     string2 - any null terminated string
  528.  
  529. RESULTS
  530.     bool - 1 if the strings are equal, 0 otherwise
  531.  
  532. SEE ALSO
  533.     JHStrCmp()
  534.  
  535. ------------------------------------------------------------------------------
  536.  
  537. jhextras.library/JHStrInStr
  538.  
  539. NAME
  540.     JHStrInStr - Search string from another (V37)
  541.  
  542. SYNOPSIS
  543.     position=JHStrInStr(string1,string2)
  544.     d0            a0      a1
  545.  
  546. FUNCTION
  547.     Searches string2 from string1 and returns the position where the
  548.     string2 can be found. If the string2 can't be found in the string1
  549.     -1 will be returned. Otherwise the value returned tells the position
  550.     of string2 in string1 starting from 0 meaning the first position in
  551.     string1. Note that this function is case-sensitive. For case-
  552.     insensitive operations use JHStrInStrNoCase.
  553.  
  554. INPUTS
  555.     string1 - any null terminated string
  556.     string2 - any null terminated string
  557.  
  558. RESULTS
  559.     position - the position of string2 in string1, or -1 if the string2
  560.            can't be found in the string1
  561.  
  562. SEE ALSO
  563.     JHStrInStrNoCase()
  564.  
  565. ------------------------------------------------------------------------------
  566.  
  567. jhextras.library/JHStrInStrNoCase
  568.  
  569. NAME
  570.     JHStrInStrNoCase - Search string from another (V37)
  571.  
  572. SYNOPSIS
  573.     position=JHStrInStrNoCase(string1,string2)
  574.     d0              a0      a1
  575.  
  576. FUNCTION
  577.     Searches string2 from string1 and returns the position where the
  578.     string2 can be found. If the string2 can't be found in the string1
  579.     -1 will be returned. Otherwise the value returned tells the position
  580.     of string2 in string1 starting from 0 meaning the first position in
  581.     string1. Note that this function is case-insensitive. For case-
  582.     sensitive operations use JHStrInStr.
  583.  
  584. INPUTS
  585.     string1 - any null terminated string
  586.     string2 - any null terminated string
  587.  
  588. RESULTS
  589.     position - the position of string2 in string1, or -1 if the string2
  590.            can't be found in the string1
  591.  
  592. SEE ALSO
  593.     JHStrInStr()
  594.  
  595. ------------------------------------------------------------------------------
  596.  
  597. jhextras.library/JHStrLen
  598.  
  599. NAME
  600.     JHStrLen - Get the string length (V37)
  601.  
  602. SYNOPSIS
  603.     length=JHStrLen(string)
  604.     d0        a0
  605.  
  606. FUNCTION
  607.     Returns the string length. Note that the string may also be null and
  608.     a0 is preserved, so after the function it still holds the string
  609.     pointer. The string must be null terminated.
  610.  
  611. INPUTS
  612.     string - any null terminated string
  613.  
  614. RESULTS
  615.     length - the string length excluding the null
  616.  
  617. ------------------------------------------------------------------------------
  618.  
  619. jhextras.library/JHUpperChar
  620.  
  621. NAME
  622.     JHUpperChar - Make char uppercase (V37)
  623.  
  624. SYNOPSIS
  625.     upperchar=JHUpperChar(char)
  626.     d0              d0
  627.  
  628. FUNCTION
  629.     Returns the char in uppercase. Handles a-z and also å,ä and ö.
  630.  
  631. INPUTS
  632.     char - any char
  633.  
  634. RESULTS
  635.     upperchar - the char in uppercase
  636.  
  637. SEE ALSO
  638.     JHLowerChar()
  639.  
  640. ------------------------------------------------------------------------------
  641.  
  642. jhextras.library/JHUpperString
  643.  
  644. NAME
  645.     JHUpperString - Make string uppercase (V37)
  646.  
  647. SYNOPSIS
  648.     upperstring=JHUpperString(string)
  649.     d0              a0
  650.  
  651. FUNCTION
  652.     Returns the string in uppercase. Handles a-z and also å,ä and ö.
  653.  
  654. INPUTS
  655.     string - any string
  656.  
  657. RESULTS
  658.     string - the string in uppercase
  659.  
  660. SEE ALSO
  661.     JHLowerChar(), JHUpperChar(), JHLowerString()
  662.  
  663. ------------------------------------------------------------------------------
  664.  
  665. jhextras.library/JHWriteBytes
  666.  
  667. NAME
  668.     JHWriteBytes - Writes some bytes to a floppy disk (V37)
  669.  
  670. SYNOPSIS
  671.     bool=JHWriteBytes(buffer,iorequest,offset,length)
  672.     d0         a0     a1      d0     d1
  673.  
  674. FUNCTION
  675.     Writes a defined amount of bytes to a floppy disk starting at offset
  676.     and using the device specified in iorequest. The buffer is the place
  677.     where the bytes are written from. This function only supports normal
  678.     DOS disks.
  679.  
  680. INPUTS
  681.     buffer    - the memory where the bytes are written from
  682.     iorequest - an IORequest block such as returned by JHEasyOpenDevice
  683.     offset    - byte offset from the start of the disk where to begin
  684.             the write
  685.     length    - the amount of bytes to be written
  686.  
  687. RESULTS
  688.     bool - non-NULL, if an error occurred, otherwise NULL
  689.  
  690. SEE ALSO
  691.     JHWriteSector(), JHWriteTrack(), JHStopDisk()
  692.  
  693. ------------------------------------------------------------------------------
  694.  
  695. jhextras.library/JHWriteSector
  696.  
  697. NAME
  698.     JHWriteSector - Writes a sector to a floppy disk (V37)
  699.  
  700. SYNOPSIS
  701.     bool=JHWriteSector(sectorbuffer,iorequest,sector)
  702.     d0           a0        a1      d0
  703.  
  704. FUNCTION
  705.     Writes a sector to a floppy disk via trackdisk.device. This function
  706.     is for normal 3.5"-inch DSDD drives. The sectorbuffer should contain
  707.     the information to be written and its length must be 512 bytes. This
  708.     function only supports normal DOS disks.
  709.  
  710. INPUTS
  711.     sectorbuffer - the data that is to be written
  712.     iorequest    - an IORequest block such as returned by JHEasyOpenDevice
  713.     sector         - the sector number to be written (0-1759)
  714.  
  715. RESULTS
  716.     bool - non-NULL, if an error occurred, otherwise NULL
  717.  
  718. BUGS
  719.     Doesn't check whether the sector number is valid (0-1759).
  720.  
  721. SEE ALSO
  722.     JHWriteBytes(), JHWriteTrack(), JHStopDisk()
  723.  
  724. ------------------------------------------------------------------------------
  725.  
  726. jhextras.library/JHWriteTrack
  727.  
  728. NAME
  729.     JHWriteTrack - Writes a track to a floppy disk (V37)
  730.  
  731. SYNOPSIS
  732.     bool=JHWriteTrack(trackbuffer,iorequest,track)
  733.     d0          a0          a1    d0
  734.  
  735. FUNCTION
  736.     Writes a track from a floppy disk via trackdisk.device. This function
  737.     is for normal 3.5"-inch DSDD drives. The trackbuffer should contain
  738.     the data to be written and its length must be 5632 bytes. Each track
  739.     contains 11 sectors and each sector consists of 512 bytes. Each 3.5"-
  740.     inch DSDD disk contains 160 tracks. This function only supports normal
  741.     DOS disks.
  742.  
  743. INPUTS
  744.     trackbuffer - the memory where the track is write
  745.     iorequest   - an IORequest block such as returned by JHEasyOpenDevice
  746.     track        - the track number to be written (0-159)
  747.  
  748. RESULTS
  749.     bool - non-NULL, if an error occurred, otherwise NULL
  750.  
  751. BUGS
  752.     Doesn't check whether the track number is valid (0-159).
  753.  
  754. SEE ALSO
  755.     JHWriteBytes(), JHWriteSector(), JHStopDisk()
  756.  
  757. ------------------------------------------------------------------------------
  758.